package edu.sctu.zhengsenwen.month201506.day20150607.StudentsAndCanteen;

import java.util.HashMap;

/**
 * Created by user15 on 2015/6/8.
 */
public class CanteenData {

    public Canteen setCanteenData(){

        //食堂名称
        Canteen canteen = new Canteen();

        canteen.canteenName = "天篱园";


        //设置食堂座位
        canteen.seats  = new Seat[20];

        for(int i = 0;i < canteen.seats.length;i++){

            Seat seat = new Seat();

            if(i % 2 == 0){

                seat.seatNumber = i;

                seat.statement = 1;

                canteen.seats[i] = seat;
            }else{

                seat.seatNumber = i;

                seat.statement = 0;

                canteen.seats[i] = seat;
            }
        }


        //设置打饭窗口信息

        LunchWindow lunchWindow1 = new LunchWindow();

        lunchWindow1.id = 1;

        lunchWindow1.onlineStudents = 3;

        HashMap<String,Dish> map1 = new HashMap<String,Dish>();

        Dish dish1 = new Dish();

        dish1.name = "青椒肉丝";

        dish1.color = "green";

        dish1.price = 6;

        map1.put(dish1.name,dish1);


        Dish dish2 = new Dish();

        dish2.name = "鱼香茄子";

        dish2.color = "red";

        dish2.price = 5;

        map1.put(dish2.name,dish2);


        Dish dish3 = new Dish();

        dish3.name = "苦瓜炒蛋";

        dish3.color = "yellow";

        dish3.price = 4;

        map1.put(dish3.name,dish3);

        lunchWindow1.dishes = map1;





        LunchWindow lunchWindow2 = new LunchWindow();

        lunchWindow1.id = 2;

        lunchWindow1.onlineStudents = 4;

        HashMap<String,Dish> map2 = new HashMap<String,Dish>();

        Dish dish4 = new Dish();

        dish4.name = "红烧土豆";

        dish4.color = "red";

        dish4.price = 4;

        map2.put(dish4.name,dish4);


        Dish dish5 = new Dish();

        dish5.name = "麻婆豆腐";

        dish5.color = "red";

        dish5.price = 5;

        map2.put(dish5.name,dish5);


        Dish dish6 = new Dish();

        dish6.name = "苦瓜炒蛋";

        dish6.color = "yello";

        dish6.price = 4;

        map2.put(dish6.name,dish6);

        lunchWindow2.dishes = map2;



        LunchWindow lunchWindow3 = new LunchWindow();

        lunchWindow1.id = 1;

        lunchWindow1.onlineStudents = 3;

        HashMap<String,Dish> map3 = new HashMap<String,Dish>();

        Dish dish7 = new Dish();

        dish7.name = "黑椒牛腩";

        dish7.color = "black";

        dish7.price = 12;

        map3.put(dish7.name,dish7);


        Dish dish8 = new Dish();

        dish8.name = "姜黄饭";

        dish8.color = "yellow";

        dish8.price = 8;

        map3.put(dish8.name,dish8);


        Dish dish9 = new Dish();

        dish9.name = "咖喱鸡饭";

        dish9.color = "white";

        dish9.price = 10;

        map3.put(dish9.name,dish9);

        lunchWindow3.dishes = map3;


        canteen.lunchWindows = new LunchWindow[]{lunchWindow1,lunchWindow2,lunchWindow3};

        return canteen;
    }
}
